READ FILE

This command will read a long word of data from the file and store it as an integer value in the variable specified.

  Syntax
READ FILE File Number, Variable
  Parameters
File Number
Integer
The file specified by the file number must be open or the command will fail
Variable
Integer
This command will read a long word of data from the file and store it as an integer value in the variable specified. This is the standard command for reading data where the datatype is not important

  Returns

This command does not return a value.

  Description

This is the standard command for reading data where the datatype is not important. The file specified by the file number must be open or the command will fail.

  Example Code
cls
open to read 1,"data.dat"
if file open(1)=1
read file 1,a
print "value = "+str$(a)
endif
close file 1
do
loop
end
  See also

FILE Commands Menu
Index